package com.example.mydesignmodule.qiaojie2;

/**
 * @author tgw
 * @date 2021/3/12
 * @describe
 */
class CoffeeRunMain {

    public static void main(String[] args) {
        CoffeeType sugar = new SugarCoffee();
        CoffeeType ordinary = new OrdinaryCoffee();
        Coffee coffee = new LargeCoffee(sugar);
        coffee.makeCoffee();
         coffee = new LargeCoffee(ordinary);
        coffee.makeCoffee();
         coffee = new SmallCoffee(ordinary);
        coffee.makeCoffee();
         coffee = new SmallCoffee(sugar);
        coffee.makeCoffee();
    }
}
